<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        var arrs = ['a','b','c','d'];
        //1 for...in循环的结果是key
        for(key in arrs){
            //需要通过数组索引才能获取value
            console.log(arrs[key])
        }
        //2 for...of循环的结果是value
        for(value of arrs){
            console.log(value)
        }
        for(let i=0;i<arrs.length;i++){
            console.log(arrs[i]);
        }
    </script>
</body>
</html>